<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
    <head>
        <title>完整demo</title>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
        <script type="text/javascript" charset="utf-8" src="<?= base_url() ?>js/ueditor_1_2_0-utf8/editor_config.js"></script>
        <script type="text/javascript" charset="utf-8" src="<?= base_url() ?>js/ueditor_1_2_0-utf8/_examples/editor_api.js"></script>
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>js/ueditor_1_2_0-utf8/themes/default/ueditor.css"/>
        <style type="text/css">
            textarea{
                float: left;
                width:300px;
                height: 400px;
                margin-left: 20px;
            }
            .clear{
                clear: both;
            }
        </style>
    </head>
    <body>
        <h1>UEditor提交示例</h1>
        <form id="form" method="post" action="../server/submit/php/getContent.php">
            <p style="color:red">给容器name，那么在后台就可以按着name给的键值在后台一次取的编辑器的值</p>
            <!--style给定宽度可以影响编辑器的最终宽度-->
            <script type="text/plain" id="myEditor" name="myEditor"style="width:1000px">
                <p>这里我可以写一些输入提示<img src="http://ueditor.baidu.com/img/logo.png" alt=""></p>
            </script>
            <p>&nbsp;&nbsp;</p>
        </form>
        手动调用form的submit方法提交需要使用sync方法<input type="button" value="手动提交" onclick="sync()" />

        <script type="text/javascript">
            var editorOption = {
                iframeCssUrl: '<?= base_url() ?>js/ueditor_1_2_0-utf8/themes/default/iframe.css'
            };
            var editor_a = new baidu.editor.ui.Editor();
            editor_a.render( 'myEditor' );
            //同步
            function sync(){
                editor_a.sync();
                document.getElementById('form').submit()
            }
        </script>
    </body>

</html>
